/**
 * @summary 目录模块
 * @description
 *   8.17 新增目录数据
 */


 import * as createAPI from '@/api/hmmm/directorys'

 export default {
   namespaced: true,
   state: {
     // 目录列表
     directorysList: [],
     catalogueslist: [],
   },
   mutations: {
     SET_DIRECTORYS_LIST(state, newValue) {
       state.directorysList = newValue;
     },
     UPDATE_CATALOGUES_LIST(state, newValue) {
      state.catalogueslist = newValue
    }
   },
   actions: {
     async getDirectorysList({ commit }, params) {
       const res = await createAPI.list(params);
       console.log(res);
       commit('SET_DIRECTORYS_LIST', res);
     },
     async uptatecatalogueslist({ commit }) {
      const res = await createAPI.catalogueslist()
      console.log('目录模块',res);
      commit('UPDATE_CATALOGUES_LIST', res)
    }
   },
 };
